/* Design and code for NYU course pages: Joshua Clayton */

:root {
  --accent-color: rgb(120, 0, 120); /* update project background color as well */
}

body {
  margin: 20px;
  padding: 0;
}

/* LEGAL DISCLAIMER
 *
 * These Fonts are licensed only for use on these domains and their subdomains:
 * cs.nyu.edu
 *
 * It is illegal to download or use them on other websites.
 *
 * While the @font-face statements below may be modified by the client, this
 * disclaimer may not be removed.
 *
 * Optimo webfonts are protected by copyright law and provided under license. To modify, alter, translate, convert, decode or reverse engineer in any manner whatsoever, including converting the Font Software into a different format is strictly prohibited. The webfont files are not to be used for anything other than web font use.
 *
 * optimo.ch
 */

@font-face {
  font-family: 'Px Grotesk';
  src: url('fonts/Px-Grotesk-Regular.eot');
  src: url('fonts/Px-Grotesk-Regular.eot?#iefix') format('embedded-opentype'),
       url('fonts/Px-Grotesk-Regular.woff2') format('woff2'),      
       url('fonts/Px-Grotesk-Regular.woff') format('woff');      
  font-weight: 400;
  font-style: normal;
}

h1, h2, h3, a {
  font-family: 'Px Grotesk', 'Helvetica Regular', sans-serif;
}

h4, h5, p, ul, ol, dl {
  font-family: 'Px Grotesk', 'Helvetica Light', sans-serif;
  /* or, Px Grotesk Light */
}

h1 {
  font-size: 1.4em;
  font-weight: normal;
}

h2, h3, h4, p.lead {
  font-size: 1.2em;
  font-weight: normal;
}

h1, h2, h3, h4 {
  margin: 0;
}

h5 {
  text-decoration: underline;
  font-weight: normal;
  margin-bottom: 0;
}

p.lead, h4 {
  margin-top: 0.7em;
  margin-bottom: 0;
}

p.lead:last-child {
  margin-bottom: 0.7em;
}

p, ul, ol, dl, .number, code, pre, h5, table {
  font-size: 0.9em;
  line-height: 1.3em;
}

code {
  font-family: Menlo, Monaco, monospace;
}

.notes > p:first-child {
  margin-top: 0;
}

.notes > p:last-child {
  margin-bottom: 0;
}

dl.reading:first-child, dt.book:first-child {
  margin-top: 0;
}

ul, dd.schedule {
  list-style: circle;
}

ul, ol, dd.schedule {
  margin-left: 0;
  padding-left: 0;
  list-style-position: inside;
}

dt {
  margin-top: 1em;
}

dd {
  margin: 0;
}

dd.schedule {
  display: list-item;
}

.book {
  font-style: italic;
}

/* link colors */

a:link, a:visited {
  text-decoration: none;
  color: var(--accent-color);
  background-color: white;
  transition-property: color;
  transition-duration: 400ms;
}

a:hover, a:focus {
  color: black;
}

a:focus {
  text-decoration: underline;
}

a:active {
  transition-duration: 0;
  opacity: 0.3;
}

a.title:link, a.title:visited {
  color: black;
  background-color: initial;
}

a.selected:link, a.selected:visited {
  text-decoration: line-through;
}

header {
  position: fixed;
  top: 20px;
  left: 160px;
  z-index: 10;
}

nav {
  padding-top: 10px;
  position: fixed;
  top: 130px;
  font-size: 1.2em;
  z-index: 10;
}

nav > a {
  display: block;
  margin-bottom: 0.55em;
  text-align: left;
}

main {
  margin-top: 130px;
  margin-left: 140px;
}

.column, .column-wide {
  padding-bottom: 15px;
}

section {
  width: 100%;
  margin-bottom: 40px;
}

section:last-child {
  padding-bottom: 10px;
}

.week {
  border-top: 1px solid var(--accent-color);
  padding-top: 9px;
  width: 100%;
  margin-bottom: 10px;
}

.row {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.08);
  border-top: 1px solid white;
}

.column, .notes, .section {
  border-top: 1px solid var(--accent-color);
  padding-top: 9px;
}

/* project background colors */

.project {
  background-color: rgba(120, 0, 120, 0.15);
}

.notes {
  border-top: none;
  padding: 10px;
}

footer {
  margin-left: 140px;
  margin-top: 20px;
  margin-bottom: 30px;
}

@media (max-width: 480px), (max-device-width: 720px) {
  body {
    -webkit-text-size-adjust: none;
  }

  header {
    position: static;
  }

  nav {
    margin-top: 15px;
    position: static;
  }

  nav > a {
    margin-bottom: 0.3em;
  }

  main {
    margin-top: 35px;
    margin-left: 0;
  }

  footer {
    margin: 0;
  }
}

@media (min-width: 960px) {
  main {
    display: flex;
    flex-wrap: wrap;
  }

  section:last-child {
    /* padding-bottom: 40px; */
    padding-bottom: 0px;
  }

  .row {
    display: flex;
    flex-wrap: wrap;
  }

  .column {
    width: 32%;
    margin-right: 2%;
    padding-bottom: 0;
  }
  
  .column-wide {
    width: 66%;
    margin-right: 0;
    padding-bottom: 0;
  }

  .column:last-child {
    margin-right: 0;
  }

  .notes {
    border-right: 1px solid white;
    width: calc(33.333% - 21px);
    padding: 10px;
  }

  .notes:last-child {
    border-right: 0;
    width: calc(33.333% - 20px);
  }

/* overlapping footer was violating color contrast accessibility */

/*
  footer {
    position: fixed;
    margin: 0;
    left: 160px;
    bottom: 20px;
    z-index: 10;
  }
*/
}